package com.wy.powerbuilder.service.impl.hxl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wy.powerbuilder.entity.hxl.carcontract;
import com.wy.powerbuilder.entity.hxl.carseat;
import com.wy.powerbuilder.entity.lwg.houses;
import com.wy.powerbuilder.mapper.hxl.carcontractMapper;;
import com.wy.powerbuilder.service.hxl.carcontractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class carcontractServiceImpl implements carcontractService {

    @Autowired
    private carcontractMapper carconall;
    @Override
    public PageInfo<carcontract> selByPage(Integer pageNum, Integer pageSize,String c_userName,String c_contractid ) {
        if(pageNum==null){
            pageNum = 1;//默认查询第一页
        }
        //对查询的信息进行分页
        //第一个参数当前页码,第二个每页的条数
        PageHelper.startPage(pageNum,pageSize) ; //使用分页插件开始分页
        //查询我们将要分页的信息
        List<carcontract> students = carconall.carsele(c_userName,c_contractid);
        //将查询的学生信息放到分页对象中去
        PageInfo<carcontract> pageInfo = new PageInfo<>(students);
        return pageInfo;
    }

    @Override
    public List<carcontract> carsele(String c_userName, String c_contractid) {
        return carconall.carsele(c_userName,c_contractid);
    }


    @Override
    public List<carseat> carseatsAll() {
        return carconall.carseatsAll();
    }

    @Override
    public int addcarcontract(carcontract st) {
        return carconall.addcarcontract(st);
    }

    @Override
    public int update(String cS_number) {
        return carconall.update(cS_number);
    }

    @Override
    public int destroy(String cS_number) {
        return carconall.destroy(cS_number);
    }

    @Override
    public int compact(String c_contractid) {
        return carconall.compact(c_contractid);
    }

    @Override
    public int deletedestroy(Integer c_id) {
        return carconall.deletedestroy(c_id);
    }

    @Override
    public int sele() {
        return carconall.sele();
    }

    @Override
    public int selel() {
        return carconall.selel();
    }

    @Override
    public int selek() {
        return carconall.selek();
    }

    @Override
    public int selem() {
        return carconall.selem();
    }

    @Override
    public int selems() {
        return carconall.selems();
    }

    @Override
    public int selema() {
        return carconall.selema();
    }
}
